var common = {

    switch_status : function (url, container) {
        var container = $(container);
        container.className = 'spin_icon';
        new Ajax.Request(url, {method: 'get', onSuccess: function(transport){
                var ret_val = transport.responseText*1;
                if(ret_val == 1){
                    container.className = 'active_icon';
                }
                if(ret_val == 0){
                    container.className = 'inactive_icon';
                }
            }
        }); 
    },

    mark_all_rows : function (name, checked){
        var a = document.getElementsByName(name);
        for(var i=0; i<a.length; i++){
            a[i].checked = checked;
        }
    },
    
    go_page : function(url){
        document.location.href = SITE_URL + url;
    }
}
